package cc.controller;

import cc.service.ITestService;
import cc.entity.Test;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * TODO
 *
 * @author My
 * @date 2021/6/22 14:53
 */
@RestController
@RequestMapping("/test")
//说明接口文件
@Api(value = "测试接口", tags = "用于测试管理的接口", description = "测试接口")
public class TestController {

    @Autowired
    ITestService testService;

    @GetMapping("/list.do")
    //说明是什么方法(可以理解为方法注释)
    @ApiOperation(value = "查询Test列表", notes = "查询Test列表")
    List<Test> list(){
        List<Test> list = testService.list();
        return list;
    }

}
